package com.yeswater.multithread.chapter1.test1_4;

import org.junit.Test;

/**
 * author : yeswater
 * date : 2023/10/18
 *
 * isAlive()
 */

public class Run {

    @Test
    public void test() {
        MyThread myThread = new MyThread();
        System.out.println("start == " + myThread.isAlive());
        myThread.start();
        System.out.println("end == " + myThread.isAlive());
    }

    @Test
    public void test1() {
        CountOperate c = new CountOperate();
        Thread t1 = new Thread(c);
        System.out.println("main start t1 isAlive = " + t1.isAlive());
        t1.setName("A");
        t1.start();
        System.out.println("main end t1 isAlive = " + t1.isAlive());
    }

}
